package org.celstec.mobilegame.gamaray;

public class OverlayTxt extends Overlay{
	
	public String text;

	
	public OverlayTxt(String text, int x, int y, String anchor, String onPress, String id){
		super(x, y, anchor, onPress, id);
		this.text = text;
	}
	
	public String toXml(String url) {
		String ret = "  <overlayTxt id=\""+id+"\">\n";
		ret += "   <text>" + text + "</text>\n";
		ret += "   <x>" + x + "</x>\n";
		ret += "   <y>" + y + "</y>\n";
		ret += "   <anchor>" + anchor + "</anchor>\n";
		if (onPress !=null) ret += "   <onPress>dimension: " + url+onPress + "</onPress>\n";
		ret += "  </overlayTxt>\n";
		return ret;
	}

}
